package com.niit.service.Impl;

import com.niit.service.AdminService;
import com.niit.dao.AdminDao;
import com.niit.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class AdminServiceImpl implements AdminService {
       @Autowired
       private  AdminDao adminDao;
       @Override
       public List<Admin> getadminList(){ return adminDao.selectAdminList(); }
       @Override
       public List<Student> getstudentList( ){
           return adminDao.selectStudentList();
       }
       @Override
       public List<Teacher> getteacherList( ){ return adminDao.selectTeacherList(); }
       @Override
       public List<Classes> getclassList(){
           return adminDao.selectClassesList();
       }
       @Override
       public List<Question> getquestionList(){
           return adminDao.selectQuestionList();
       }
       @Override
       public List<ExamPaper> getexampaperList(){
           return adminDao.selectExamPaperList();
       }



       @Override
       public int addAdmin(Admin admin){
           return adminDao.insertAdmin(admin);
       }
       @Override
       public int addStudent(Student student){ return adminDao.insertStudent(student); }
       @Override
       public int addTeacher(Teacher teacher){ return adminDao.insertTeacher(teacher); }
       @Override
       public int addClass(Classes classes){ return adminDao.insertClass(classes); }
       @Override
       public int addQuestion(Question question){ return adminDao.insertQuestion(question); }
       @Override
       public int addExamPaper(ExamPaper examPaper){ return adminDao.insertExamPaper(examPaper); }

       @Override
       public Admin selectAdminId(Long id){
           return adminDao.selectAdminById(id);
       }
       @Override
       public Student selectStudentId(Long id){
        return adminDao.selectStudentById(id);
    }
       @Override
       public Teacher selectTeacherId(Long id){
        return adminDao.selectTeacherById(id);
    }
       @Override
       public Classes selectClassId(Long id){
        return adminDao.selectClassById(id);
    }
       @Override
       public Question selectQuestionId(Long id){
        return adminDao.selectQuestionById(id);
    }
       @Override
       public  ExamPaper selectExamPaperId(Long id){ return adminDao.selectExamPaperById(id); }

       @Override
       public int upAdmin(Long id){ return adminDao.updateAdmin(id); }
       @Override
       public int upTeacher(Long id){ return adminDao.updateTeacher(id); }
       @Override
       public int upStudent(Long id){ return adminDao.updateStudent(id); }
       @Override
       public int upClass(Long id){ return adminDao.updateClass(id); }
       @Override
       public int upQuestion(Long id){ return adminDao.updateQuestion(id); }
       @Override
       public int upExamPaper(Long id){ return adminDao.updateExamPaper(id); }
       @Override
       public int upstatus(Long id){ return adminDao.updatestatus(id); }


    @Override
       public int deleteAdminById(Long id){
           return adminDao.deleteAdminById(id);
       }
       @Override
       public int deleteStudentById(Long id){
           return adminDao.deleteStudentById(id);
       }
       @Override
       public int deleteTeacherById(Long id){
           return adminDao.deleteTeacherById(id);
       }
       @Override
       public int deleteClassById(Long id){ return adminDao.deleteClassById(id); }
       @Override
       public int deleteQuestionById(Long id){ return adminDao.deleteQuestionById(id); }
       @Override
       public int deleteExamPaperById(Long id){ return adminDao.deleteExamPaperById(id); }
}
